import api from './request'
// 获取考试分类
export const getksfl = () => api({
    url: 'home/getFirstClassify',
    method: 'GET'
})
// 获取考试分类下分类
export const getksfl2 = (id) => api({
    url: 'home/getMajor/' + id,
    method: 'GET',
    params: {
        classify_id: id
    }
})
// 获取tab
export const gettab = (id) => api({
    url: 'home/getSecondClassify/' + id,
    method: 'GET',
    params: {
        classify_id: id
    }
})
// 直播
export const getzhibo = (id) => api({
    url: 'home/liveToday/' + id,
    method: 'GET',
    params: {
        classify_id: id
    }
})
// 获取轮播图
export const getlbt = () => api({
    url: 'home/banner/1/4',
    method: 'GET'
})
// 请求免费直播课
export const mfzb = (id) => api({
    url: 'home/marketingCourse/1',
    method: 'GET'
})
// 请求精选
export const jingxuan = (id) => api({
    url: 'home/recommendCourse/1',
    method: 'GET'
})
// 搜索
export const lsss = (val) => api({
    url: 'home/classifyCourse/1',
    method: 'GET',
    params: {
        val,
        classify_id: 1,
        title: val
    }
})
// 请求详情也数据
export const getxq = (id) => api({
    url: `courseInfo/basis_id=${id}/st=1`,
    method: 'GET',
    params: {
        basis_id: id,
        st: 0,
        channel: ''
    }
})
// 获取gkk页面事件
export const getgkk = (id) => api({
    url: 'home/marketingCoursePage/' + id,
    method: 'GET',
    params: {
        classify_id: id
    }
})
// 获取可签准备
export const getkqzb = (id) => api({
    url: 'getWechatInfo/' + id,
    method: 'GET',
    params: {
        id: id
    }
})
// 获取时间排序
export const getsjpx = (id) => api({
    url: 'courseInfo/orderByChapterList/' + id,
    method: 'GET',
    params: {
        course_id: id
    }
})
// 获取评价
export const getpj = (id) => api({
    url: 'getAllCommentByType',
    method: 'POST',
    data: {
        course_id: id,
        type: 1
    }
})
// 图片验证码接口
export const imgcodeApi = () => api({
    url: 'getImgCode',
    method: 'GET',
})
// 登录接口
export const loginApi = (data) => api({
    url: 'login',
    method: 'POST',
    data
})
// 手机号接口
export const mobeilApi = (data) => api({
    url: 'getsmscode',
    method: 'POST',
    data
})
// 收藏的接口
export const shouapi = (data) => api({
    url: 'collect',
    method: 'POST',
    data
})